import { service } from '@/utils/axios'

const BASE_URL = '/v1/vehicle-bring-goods'

// 新增
export function addVehicleBringGoods(data: any): Promise<any> {
  return service({
    url: BASE_URL,
    method: 'post',
    data
  })
}

// 更新
export function updateVehicleBringGoods(code: any, data: any): Promise<any> {
  return service({
    url: `${BASE_URL}/${code}`,
    method: 'put',
    data
  })
}

// 列表
export function getVehicleBringGoodsPageList(params: any) {
  return service({
    url: `${BASE_URL}/page`,
    method: 'get',
    params
  })
}

// 详情
export function getVehicleBringGoodsDataForm(code: any): Promise<any> {
  return service({
    url: `${BASE_URL}/${code}/form`,
    method: 'get'
  })
}

// 校验
export function examineResult(code: any): Promise<any> {
  return service({
    url: `${BASE_URL}/${code}/examine`,
    method: 'put'
  })
}
